<%--
  Created by IntelliJ IDEA.
  User: Pro
  Date: 2018-06-13
  Time: 22:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>临时JSP</title>
    <link rel="shortcut icon" href="static/assets/css/images/favicon.png">
</head>
<body>
<article>
    <div id="preview" class="col-12">
        <textarea style="display:none;" placeholder="markdown语言" id="text"></textarea>
    </div>
</article>
<script src="static/assets/js/jquery.min.js"></script>
<script src="static/assets/markdown/lib/marked.min.js"></script>
<script src="static/assets/markdown/lib/prettify.min.js"></script>
<script src="static/assets/markdown/lib/raphael.min.js"></script>
<script src="static/assets/markdown/lib/underscore.min.js"></script>
<script src="static/assets/markdown/lib/sequence-diagram.min.js"></script>
<script src="static/assets/markdown/lib/flowchart.min.js"></script>
<script src="static/assets/markdown/lib/jquery.flowchart.min.js"></script>
<script src="static/assets/markdown/js/editormd.js"></script>


<script>
    $.ajax({
        url: '/temp.json?id=2',
        dataType: 'JSON',
        type: 'GET',
        data: {},
        success: function (temp) {
            console.log(temp);
            $('#text').text(temp.text);
            editormd.markdownToHTML("preview", {
                htmlDecode      : "style,script,iframe",
                emoji           : true,
                taskList        : true,
                tex             : true,  // 默认不解析
                flowChart       : true,  // 默认不解析
                sequenceDiagram : true  // 默认不解析
            });
        },
        error: function () {

        }
    });
</script>
</body>
</html>
